/*
 * Copyright 2018 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@blockHeight_returnToDRGHeight: 32px;
@blockHeight_expressionType: 32px;
@blockHeight_total: 64px;

.kie-dmn-container {
  display: flex;
  flex-direction: column;
  padding: 10px;
  width: 100%;
  height: 100%;

  .kie-dmn-new-expression-editor {
    overflow: auto;
    height: 100%;
  }

  .kie-dmn-new-expression-editor.hidden, .kie-dmn-expression-type.hidden, .kie-dmn-expression-editor.hidden {
    display: none;
  }
}

.kie-dmn-return-to-link {
  display: flex;
  align-items: center;
}

.kie-dmn-return-to-link i {
  //This duplicates Bootstraps spacing for breadcrumbs
  padding: 0 9px 0 7px;
}

.kie-dmn-expression-type {
  height: @blockHeight_expressionType;
  display: block;

  #name {
    font-size: large;
  }

  #type {
    font-size: larger;
    font-style: italic;
    color: grey;
  }
}

.kie-dmn-expression-editor {
  display: flex;
  width: 100%;
  height: ~"calc(100% - @{blockHeight_total})";
  top: @blockHeight_total px;
}

[data-i18n-prefix="ExpressionEditorViewImpl."] {
  .kie-beta-boxed-expression-editor {
    // PatterFly 4 mocked font-style
    font-family: RedHatDisplay, Overpass, overpass, helvetica, arial, sans-serif;
    color: #555;
    font-size: 13px;
    padding: 4px;
    display: flex;
    flex-grow: 1;
    align-items: center;
    user-select: none;

    a {
      color: #06c;
    }

    .beta-description,
    .stable-description {
      padding: 0 3px;
      flex-grow: 1;
    }

    .beta-dash,
    .beta-badge,
    .stable-badge,
    .beta-description,
    .stable-description {
      user-select: none;
      display: unset;
    }

    .beta-badge,
    .beta-description {
      display: none;
    }

    &.kie-beta-boxed-expression-editor--enabled {
      .beta-badge,
      .beta-description {
        display: unset;
      }

      .stable-badge,
      .stable-description {
        display: none;
      }
    }

    .beta-badge,
    .stable-badge {
      border-width: 1px;
      border-style: solid;
      border-radius: 20px;
      padding: 0 8px;
    }

    .beta-badge {
      border-color: #06c;
      color: #06c;
    }

    .stable-badge {
      border-color: #c1c1c5;
      color: #818195;
    }

    .beta-dash {
      border-top: 1px solid #ccc;
      width: 22px;
      height: 4px;
      margin: 0 8px;
    }
  }
}
